package nezumi.sensing;

import nezumi.util.AngleGeometry;

/**
 * An IR sensor mode with only 3 distinct values corresponding to zones: A -
 * very close to the robot: very loew probability. B - close to the distance
 * indicated by the sensor: very high probability C - very far away: low
 * probability
 * 
 * @author rui
 * 
 */
public class BeaconDiscreteSensorModel implements ISensorModel {

	protected static final float A_CUTOFF = 1;
	protected static final float A_PROB = 0.1f;
	protected static final float B_CUTOFF = 1;
	protected static final float B_PROB = 0.1f;
	protected static final float C_CUTOFF = 1;
	protected static final float C_PROB = 0.1f;

	public double computeProb(final double reading, final double x) {
		if (Math.abs(AngleGeometry.angleDifference(reading, x)) < 0.025)
			return 1;
		else
			return 0;
	}

}
